html(lang="en")
	include header
	script(src="./js/trust_algo.js")
	body
		include nav
		div(id="default_algo_passive", style="visibility:hidden;")=p_default
		div(id="default_algo_active", style="visibility:hidden;")=a_default
		div(class="container")
			div(class="panel panel-default text-center")
				h2 Trust Management and Interaction Authorization
			div(class="panel panel-primary")
				div(class="panel-heading")
					h3(class="panel-title") Trust Management
				div(class="panel-body")
					div(class="panel-group" id="accordion_p")
						for alg in p_algos
							div(class="panel panel-default", id='collapse_p_panel' + alg.id)
								div(class="panel-heading")
									h4
										a(data-toggle="collapse", data-parent="#accordion_p", href='#collapse_p_' + alg.id)=alg.name
										button(type="button", class="btn btn-primary pull-right", id=('p' + alg.id)) Enable
								div(id='collapse_p_' + alg.id, class="panel-collapse collapse")
									div(class="panel-body")
										pre=alg.alg

			div(class="panel panel-primary")
				div(class="panel-heading")
					h3(class="panel-title") Interaction Authorization
				div(class="panel-body")
					div(class="panel-group" id="accordion_a")
						for alg in a_algos
							div(class="panel panel-default", id='collapse_a_panel' + alg.id)
								div(class="panel-heading")
									h4
										a(data-toggle="collapse", data-parent="#accordion_a", href='#collapse_a_' + alg.id)=alg.name
										button(type="button", class="btn btn-primary pull-right", id=('a' + alg.id)) Enable
								div(id='collapse_a_' + alg.id, class="panel-collapse collapse")
									div(class="panel-body")
										h4 Authorization Algorithm
										pre=alg.auth
										h4 Trust Management Algorithm
										pre=alg.alg
										pre
											a(href='/show_active_authz_policy?id=' + alg.id) Show Policy
